home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinXP Start Menu 2.xpl < prev    next >
Text File  |  2002-01-01  |  5KB  |  192 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Start menu\Windows XP\New Start Menu"
  5. "NAME"="Visible Items"
  6. "VERSION"="2.01"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="0000011"
  9. "TEXT 1"="Aha! You can't see this!"
  10. "DESCRIPTION 1"="Use this plug-in to show or hide some of the items in the new (two columns) Start menu of Windows XP."
  11. "DESCRIPTION 2"="Pinned Programs: A "pinned" program is a program that you right clicked and selected "Pinn to Start Menu" from the context menu. It's basically something like a quick-launch bar because the Programs are available directly after you opened the Start button."
  12. "AUTHOR"="Xteq Systems"
  13. "CONTACTURL"="http://www.xteq.com/"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"=" "
  16.  
  17.  
  18. 'stupid Windows XP! Has two settings for each item. Either in Classic Logon or in New Mode! GNARF!
  19.  
  20.  sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
  21.  
  22. sP2="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\"
  23.  
  24.  sV1=sP2 & "Start_ShowMyDocs"
  25.  sV2=sP2 & "Start_ShowRecentDocs"
  26.  sV3=sP2 & "Start_ShowRun" 
  27.  sV4=sP2 & "Start_ShowMyPics"
  28.  sV5=sP2 & "Start_ShowMyMusic"
  29.  sV6=sP2 & "Start_ShowMyComputer"
  30.  sV7=sP2 & "Start_ShowControlPanel"
  31.  sV8=sP2 & "Start_ShowHelp"
  32.  sV9=sP2 & "Start_ShowSearch"
  33. sV10=sP2 & "Start_ShowNetConn"
  34. sV11=sP2 & "Start_ShowPrinters"
  35. sV12=sP2 & "Start_AdminToolsRoot"
  36. 'only setting that applies to Classic & New Menu!
  37. sV13=sP2 & "StartMenuFavorites"
  38.  
  39. 'real policies start here
  40. sV14=sP & "NoStartMenuPinnedList"
  41. sV15=sP & "NoStartMenuMFUProgramsList"
  42. sV16=sP & "NoStartMenuMorePrograms"
  43. sV17=sP & "NoUserNameInStartMenu"
  44. sV18=sP & "NoClose"
  45. sV19=sP & "StartMenuLogoff" 'which idot coder at MS forgot the "No" part ?!?!?!?!
  46. sV20=sP & "NoStartMenuEjectPC"
  47.  
  48. SUB Plugin_Initialize
  49.  Call SetUIElement(1,"Right column: My Documents")
  50.  Call ReadIt_2(1,sV1)
  51.  
  52.  Call SetUIElement(2,"Right column: Recent Documents")
  53.  Call ReadIt_2(2,sV2)
  54.  
  55.  Call SetUIElement(3,"Right column: Run...")
  56.  Call ReadIt_2(3,sV3)
  57.  
  58.  Call SetUIElement(4,"Right column: My Pictures")
  59.  Call ReadIt_2(4,sV4)
  60.  
  61.  Call SetUIElement(5,"Right column: My Music")
  62.  Call ReadIt_2(5,sV5)
  63.  
  64.  Call SetUIElement(6,"Right column: My Computer")
  65.  Call ReadIt_2(6,sV6)
  66.  
  67.  Call SetUIElement(7,"Right column: Control Panel")
  68.  Call ReadIt_2(7,sV7)
  69.  
  70.  Call SetUIElement(8,"Right column: Help & Support")
  71.  Call ReadIt_2(8,sV8)
  72.  
  73.  Call SetUIElement(9,"Right column: Search")
  74.  Call ReadIt_2(9,sV9)
  75.  
  76.  Call SetUIElement(10,"Right column: Network Connections")
  77.  Call ReadIt_2(10,sV10)
  78.  
  79.  Call SetUIElement(11,"Right column: Printers")
  80.  Call ReadIt_2(11,sV11)
  81.  
  82.  Call SetUIElement(12,"Right column: Administration")
  83.  Call ReadIt_2(12,sV12)
  84.  
  85.  Call SetUIElement(13,"Right column: Favorites")
  86.  Call ReadIt_2(13,sV13)
  87.  
  88.  Call SetUIElement(14,"Left column: All 'pinned' programs")
  89.  Call ReadIt(14,sV14)
  90.  
  91.  Call SetUIElement(15,"Left column: All recently used programs")
  92.  Call ReadIt(15,sV15)
  93.  
  94.  Call SetUIElement(16,"Left column: 'More Programs' link")
  95.  Call ReadIt(16,sV16)
  96.  
  97.  Call SetUIElement(17," Top: Show username on top of Start Menu")
  98.  Call ReadIt(17,sV17)
  99.  
  100.  Call SetUIElement(18,"Bottom: 'Shutdown' button")
  101.  Call ReadIt(18,sV18)
  102.  
  103.  Call SetUIElement(19,"Bottom: 'Logoff' button")
  104.  Call ReadIt(19,sV19)
  105.  
  106.  Call SetUIElement(20,"Bottom: 'Undock PC' button")
  107.  Call ReadIt(20,sV20)
  108.  
  109. END SUB
  110.  
  111. 'Called when the Plugin should apply the changes
  112. SUB Plugin_Apply(ElementIndex,ElementSubIndex) 
  113.  Call WriteIt_2(1,sV1)
  114.  Call WriteIt_2(2,sV2)
  115.  Call WriteIt_2(3,sV3)
  116.  Call WriteIt_2(4,sV4)
  117.  Call WriteIt_2(5,sV5)
  118.  Call WriteIt_2(6,sV6)
  119.  Call WriteIt_2(7,sV7)
  120.  Call WriteIt_2(8,sV8)
  121.  Call WriteIt_2(9,sV9)
  122.  Call WriteIt_2(10,sV10)
  123.  Call WriteIt_2(11,sV11)
  124.  Call WriteIt_2(12,sV12)
  125.  
  126.  Call WriteIt_2(13,sV13)
  127.  
  128.  Call WriteIt(14,sV14)
  129.  Call WriteIt(15,sV15)
  130.  Call WriteIt(16,sV16)
  131.  Call WriteIt(17,sV17)
  132.  Call WriteIt(18,sV18)
  133.  Call WriteIt(19,sV19)
  134.  Call WriteIt(20,sV20)
  135.  
  136.  Call IndicateSettingChange()
  137.  Call Logoff()
  138. END SUB
  139.  
  140. Sub ReadIt(ITM,PATH1)
  141.  if RegValueExists(PATH1)=false then 'setting available?
  142.     'no setting -> item visible
  143.     Call SetUIElementEx(ITM,true)
  144.  else
  145.     i=RegReadValue(PATH1)
  146.     if i=0 then 
  147.        Call SetUIElementEx(ITM,true)
  148.     end if
  149.  end if
  150. End Sub
  151.  
  152. Sub ReadIt_2(ITM,PATH1)
  153.  if RegValueExists(PATH1)=false then 'setting available?
  154.     'no setting -> item not visible
  155.     Call SetUIElementEx(ITM,false)
  156.  else
  157.     i=RegReadValue(PATH1)
  158.     if i>0 then 
  159.        Call SetUIElementEx(ITM,true)  
  160.     end if
  161.  end if
  162. End Sub
  163.  
  164.  
  165. Sub WriteIt(ITM,PATH1)
  166.  b=GetUIElementEx(ITM)
  167.  if b=true then
  168.  
  169.     s=RegReadValue(PATH1)
  170.     if IsEmpty(s)=false then
  171.        Call RegDeleteValue(PATH1)
  172.     end if
  173.  
  174.  else
  175.     Call RegWriteValue(PATH1,1,2)
  176.  end if
  177. End Sub
  178.  
  179. Sub WriteIt_2(ITM,PATH1)
  180.  b=GetUIElementEx(ITM)
  181.  if b=true then
  182.     i=RegReadValue(PATH1)
  183.     if i<1 then
  184.        Call RegWriteValue(PATH1,1,2)
  185.     end if
  186.  else
  187.     Call RegWriteValue(PATH1,0,2)
  188.  end if
  189. End Sub
  190. SUB Plugin_Terminate
  191. END SUB
  192.